﻿@page "/search"
@model Moonglade.Web.Pages.SearchModel
@section meta
{
    <meta name="robots" content="noindex, nofollow" />
}
@{
    ViewBag.BodyClass = "body-search-list bg-gray-1";
    HttpContext.Response.Headers.Add("X-Robots-Tag", "noindex, nofollow");
}

<h3 class="mb-4">
    @SharedLocalizer["Search Result"]
</h3>

@if (!Model.Posts.Any())
{
    <div class="alert alert-info">
        @SharedLocalizer["No Matching Result"]
    </div>
}
else
{
    foreach (var item in Model.Posts.OrderByDescending(s => s.PubDateUtc))
    {
        <partial name="_PostListEntry" model="item" />
    }
}

<partial name="_LightSwitch" />